//
//  PopBaseControl.h
//  HTMAnimations
//
//  Created by Ting Han on 2017/9/14.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import <UIKit/UIKit.h>

@class PopBaseControl;
@protocol PopBaseControlDelegate <NSObject>

@optional
//缩放百分比事件
- (void)popBaseControl:(PopBaseControl *)control currentPercent:(CGFloat)percent;
//点击事件
- (void)popBaseControlTouchEvent:(PopBaseControl *)control;

@end


@interface PopBaseControl : UIView

@property (nonatomic,weak) id<PopBaseControlDelegate>delegate;

//动画时间，默认0.4s
@property (nonatomic) CFTimeInterval animationDuration;
//目标
@property (nonatomic,weak) id target;

//控制事件
@property (nonatomic) SEL selector;

//容器
@property (nonatomic,strong,readonly) UIView *contentView;

//是否可用
@property (nonatomic,assign) BOOL enabled;

//是否选中
@property (nonatomic,assign) BOOL selected;

#pragma mark -- 子类重载
//当前百分比
- (void)currentPercent:(CGFloat)percent;
//事件激活
- (void)controllEventActived;
@end
